package main.java.game.event;


import java.util.List;

import main.java.game.Game;
import main.java.game.combatant.Hero;

public class Festival extends Event {
	
	public Festival(String name, Boolean subscribed){
		super(name,subscribed);
		
	}
	public void takeEffect(Game game){
		super.takeEffect(game);
		List<Hero> listH =game.getPlayer().getHeroes();
		for(Hero hero: listH){
			if(hero.getInitialLifePoints()>hero.getLifepoints()){
				hero.setLifepoints(hero.getInitialLifePoints());
			}
		}
		System.out.println("All your heroes was regenerated!\n");
		
		
	}

}
